import { fetcher } from "@/app/utils/fetcher"
import useSWR from "swr"

export const useFavorites = () => {
    const {data,error,isLoading,mutate} = useSWR("/api/favorite",fetcher,{
        revalidateIfStale:false,
        revalidateOnFocus:false,
        revalidateOnReconnect:false
    })
    return {data,error,isLoading,mutate}
}
export const useBillboard = () => {
    const {data,error,isLoading,mutate} = useSWR("/api/random",fetcher)
    return {data,error,isLoading,mutate}
}